﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using ExamSharedClasses;

namespace ExamSharedClasses.Commands
{
    /// <summary>
    /// (k) Loginobjekt enthält Anmeldeinformationen und wird dem Server übermittelt.
    /// Der Server antwortet dann aber mit einem Messageobjekt
    /// </summary>
    [Serializable()]
    public class Login : Command 
    {
        public const string NAME = "login";
        public const string EMAIL = "email";
        
        public string Email { get; set; }
        public Password Password { get; set; }

        public Login()
        {
            Email = "";
            Password = new Password();
        }
        public Login(string email, Password password)
        {
            this.Email = email;
            this.Password = password;
        }
        public override string ToString() {
            StringBuilder sb = new StringBuilder( base.ToString() + "Login:" );
            if (Email!=null)
                sb.Append(Email);
            if ( Password != null )
                sb.Append( Password );
            return base.ToString();
        }

    }
}